
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <BSerialPort>
#include <BButton>
#include <BComboBox>
#include <BCheckBox>
#include <BTextEdit>
#include <BMainWindow>

using namespace BWE;

class MainWindow : public BMainWindow
{
public:
	MainWindow();

protected:
	void slotResetClicked(BObject* object, const BValue& value);
	void slotCurrentChanged(BObject* object, const BValue& value);
	void slotOpenButtonToggled(BObject* object, const BValue& value);
	void slotWriteTextEditKeyPressed(BObject* object, const BValue& value);

protected:
	virtual void showEvent(const BEvent& event);

	virtual void updateEvent(const BEvent& event);

private:
	BTextEdit*			_readTextEdit;
	BTextEdit*			_writeTextEdit;
	BComboBoxHolder		_portComboBox;
	BButtonHolder		_resetButton;
	BButtonHolder		_openButton;
	BSerialPortHolder	_serialport;
};

#endif